package com.rollcall.wisdomroll;

import android.support.v4.app.Fragment;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.ListView;
import android.widget.SearchView;
import android.widget.Toast;

import com.rollcall.wisdomroll.utils.StatusBarUtil;

import java.util.ArrayList;
import java.util.List;

public class queryActivity extends Fragment {
    private SearchView searchView;
    public static final String[] CONTENTS = new String[]{"zg陕西","zg海南","zg新疆","zg西藏"};
    AutoCompleteTextView textView;


    @Override
    //创建视图
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate( R.layout.activity_query, container, false );  //要加载的layout文件
    }

    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
        super.onActivityCreated(savedInstanceState);
//        textView = (AutoCompleteTextView) searchView.findViewById(R.id.autoCompleteTextView1);
//        //创建一个ArrayAdapter适配器
//        ArrayAdapter<String> adapter;
//        adapter = new ArrayAdapter<String>(getActivity(),android.R.layout.simple_dropdown_item_1line,CONTENTS);
//        textView.setAdapter(adapter);
//
//        Button button = (Button) getActivity().findViewById(R.id.button1);
//        button.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                Toast.makeText( getActivity(),textView.getText().toString(),Toast.LENGTH_SHORT).show();
//            }
//        });
    }

    // 初始化控键对象
        //initView();
        // 添加监听
//        setOnclickByZJ();
    }

